﻿Public Class USUARIOS
    Private Sub USUARIOS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'LOGINDataSet.LOGIN' table. You can move, or remove it, as needed.
        Me.LOGINTableAdapter.Fill(Me.LOGINDataSet.LOGIN)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        LOGINBindingSource.MoveFirst()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        LOGINBindingSource.MovePrevious()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        LOGINBindingSource.AddNew()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Try
            Me.Validate()
            Me.LOGINBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.LOGINDataSet)
        Catch EX As Exception
            MsgBox("Erro ao atualizar os dados" + Environment.NewLine + EX.ToString, MsgBoxStyle.Information, "Atenção")
        End Try
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Try
            Me.Validate()
            LOGINBindingSource.RemoveCurrent()
            LOGINTableAdapter.Update(LOGINDataSet.LOGIN)
        Catch ex As Exception
            MsgBox("Erro ao deletar os dados" + Environment.NewLine + ex.ToString, MsgBoxStyle.Information, "Atenção")
        End Try
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        LOGINBindingSource.MoveNext()
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        LOGINBindingSource.MoveLast()
    End Sub
End Class